{% load i18n %}
<!DOCTYPE html>
<html>
　<head>
　 <title>{% trans '手机员工自助' %}</title>
   {% block blockbots %}
　 <meta name="viewport" content="width=device-width, initial-scale=1">
　 <link rel="stylesheet" href="/media/wap/css/jquery.mobile-1.3.0.min.css" />
   <link rel="stylesheet" href="/media/wap/css/customize.css" />
   <link type="text/css" href="/media/wap/css/jqm-datebox.min.css" rel="stylesheet">
　 <script src="/media/wap/jquery-1.9.1.min.js"></script>
　 <script src="/media/wap/jquery.validate.min.js"></script>
　 <script src="/media/wap/jquery.mobile-1.3.0.min.js"></script>
   <script src="/media/wap/mobile_login.js"></script>
   <script src="/media/wap/jquery.mobile-1.3.2.min.map.js"></script>
   <script src="/media/jslib/i18n.js"></script>
   <script src="/media/jslib/i18n_{{ LANGUAGE_CODE }}.js"></script>
   {% endblock %}
</head>
<body>
  {% block page%}
　<div data-role="page" id="main_page">
      {% block import_extend_js %} <!-- 内部js模块 -->
      {% endblock %}

      {% block hidden %}
      <input type="hidden" value="{{app_label}}" id="app_label"></input>
      <input type="hidden" value="{{app_menu}}" id="app_menu"></input>
      <input type="hidden" value="{{model_app}}" id="model_app"></input>
      <input type="hidden" value="{{model_name}}" id="model_name"></input>
      {% endblock %}
      <div data-role="header" data-position="fixed"   data-theme="b" data-inset="false" id="main_header">
            {% block header %} <!-- 头部模块 -->
            <div style="text-align:center;"><img  src="/media/wap/images/logo.png"></img></div>
            <a href="#info" data-rel="popup" data-role="button" data-icon="user" data-iconpos="notext" class="ui-btn-right">Grid</a>
            <div data-role="navbar">
                <ul>
                    {% for app in apps_and_models.wap_apps %}
                       {% ifequal app.label app_menu %}
                         <li><a href="/wap/{{app.label}}/UI/" data-theme="c"  data-ajax="false">{{app.label|wap_app_filter}}</a></li>
                       {% else %}
                          <li><a href="/wap/{{app.label}}/UI/" data-theme="b"  data-ajax="false">{{app.label|wap_app_filter}}</a></li>
                       {% endifequal %}
                    {% endfor%}
                </ul>
            </div><!-- /navbar -->
            {% endblock %}
     </div>
    　 <div data-role="content" id="main_content">
          <div id="loader" class="wap-loader-img" style="display:none"><img src="{{MEDIA_URL}}/wap/css/images/ajax-loader.gif"></img></div>
          {% block content %} <!-- 内容模块 -->
              {% block extend_content%}
              {% endblock %}
          <ul data-role="listview" data-inset="true" data-shadow="false">
              {% for model in apps_and_models.models%}
                  {% if model.actions %}
                      <li data-role="collapsible" data-iconpos="right" data-inset="false">
                        <h2>{{model.verbose_name}}</h2>
                        <ul data-role="listview" data-theme="c" data-inset="false" >
                          {% for action in model.actions %}
                          <li data-inset="false"><a href="{{action.ref}}" data-ajax="false"><p>{{action.ver_name}}</p></a></li>
                          {% endfor %}
                          <li><a href="{{model.url}}" data-ajax="false"><p>{{model.verbose_name}}{% trans '查询' %}</p></a></li>
                        </ul>
                      </li>
                  {% else %}
                      <li><a href="{{model.url}}" data-ajax="false" >{{model.verbose_name}}</a></li>
                  {% endif %}
              {% endfor %}
            </ul>
          {% endblock %}
          {% block popup %} <!-- 弹窗模块 -->
          <div data-role="popup" id="info" >
             <ul data-role="listview">
               <li data-icon="false"><a href="#" data-icon="false">{% trans '姓名' %}:{{employee.EName}}</a></li>
               <li data-icon="false"><a href="#" >{% trans '工号' %}:{{employee.PIN}}</a></li>
               <li data-icon="false"><a href="#" id="logout">{% trans '退出' %}</a></li>
             </ul>
          </div>
          {% endblock %}
          <script>{% block addjs%}{% endblock %}</script>
          
    　</div><!-- /content -->


        {% block footer %}  <!-- 底部模块 -->
        {% endblock %}

　</div><!-- /page -->
{% endblock %}
</body>
</html>

